import request from '@/utils/request'

// 查询推荐房源列表
export function listRecommendItem(query) {
  return request({
    url: '/recommend/recommendItem/list',
    method: 'get',
    params: query
  })
}

// 查询推荐房源详细
export function getRecommendItem(itemId) {
  return request({
    url: '/recommend/recommendItem/' + itemId,
    method: 'get'
  })
}

// 新增推荐房源
export function addRecommendItem(data) {
  return request({
    url: '/recommend/recommendItem',
    method: 'post',
    data: data
  })
}

// 批量新增推荐房源
export function addRecommendItems(data) {
  return request({
    url: '/recommend/recommendItem/batchAdd',
    method: 'post',
    data: data
  })
}

// 修改推荐房源
export function updateRecommendItem(data) {
  return request({
    url: '/recommend/recommendItem',
    method: 'put',
    data: data
  })
}

// 删除推荐房源
export function delRecommendItem(itemId) {
  return request({
    url: '/recommend/recommendItem/' + itemId,
    method: 'delete'
  })
}
